package com.ybkj.o2o.zhuanche.entity;

import com.ybkj.o2o.zhuanche.common.json.DateTimeJsonSerializer;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.io.Serializable;
import java.util.Date;
/**
 * 车型可接单关联车型
 * @author Administrator
 *
 */
public class CarTypeRel implements Serializable {
  private static final long serialVersionUID = 1L;
  private Long id;
  @JsonSerialize(using = DateTimeJsonSerializer.class)
  private Date created;// 创建时间
  @JsonSerialize(using = DateTimeJsonSerializer.class)
  private Date updated;// 修改时间

  private Long carTypeId;// 类型Id

  private String accessibleType;// 可选择类型

  private String appKey;



  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Date getCreated() {
    return created;
  }

  public void setCreated(Date created) {
    this.created = created;
  }

  public Date getUpdated() {
    return updated;
  }

  public void setUpdated(Date updated) {
    this.updated = updated;
  }

  public Long getCarTypeId() {
    return carTypeId;
  }

  public void setCarTypeId(Long carTypeId) {
    this.carTypeId = carTypeId;
  }

  public String getAccessibleType() {
    return accessibleType;
  }

  public void setAccessibleType(String accessibleType) {
    this.accessibleType = accessibleType;
  }

  public String getAppKey() {
    return appKey;
  }

  public void setAppKey(String appKey) {
    this.appKey = appKey == null ? null : appKey.trim();
  }

  @Override
  public boolean equals(Object that) {
    if (this == that) {
      return true;
    }
    if (that == null) {
      return false;
    }
    if (getClass() != that.getClass()) {
      return false;
    }
    CarTypeRel other = (CarTypeRel) that;
    return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
        && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(
            other.getCreated()))
        && (this.getUpdated() == null ? other.getUpdated() == null : this.getUpdated().equals(
            other.getUpdated()))
        && (this.getCarTypeId() == null ? other.getCarTypeId() == null : this.getCarTypeId()
            .equals(other.getCarTypeId()))
        && (this.getAccessibleType() == null ? other.getAccessibleType() == null : this
            .getAccessibleType().equals(other.getAccessibleType()))
        && (this.getAppKey() == null ? other.getAppKey() == null : this.getAppKey().equals(
            other.getAppKey()));
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
    result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
    result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
    result = prime * result + ((getCarTypeId() == null ? 0 : getCarTypeId().hashCode()));
    result = prime * result + ((getAccessibleType() == null ? 0 : getAccessibleType().hashCode()));
    result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode());
    return result;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append(getClass().getSimpleName());
    sb.append('[');
    sb.append("Hash = ").append(hashCode());
    sb.append(", id=").append(id);
    sb.append(", created=").append(created);
    sb.append(", updated=").append(updated);
    sb.append(", carTypeId").append(carTypeId);
    sb.append(", accessibleType").append(accessibleType);
    sb.append(", appKey=").append(appKey);
    sb.append(", serialVersionUID=").append(serialVersionUID);
    sb.append(']');
    return sb.toString();
  }
}
